Skip to content

Add threshold presets to duplicate settings dialog#540

Open
Greensand321 wants to merge 1 commit intomainfrom
codex/add-presets-to-threshold-button
Open

Add threshold presets to duplicate settings dialog#540
Greensand321 wants to merge 1 commit intomainfrom
codex/add-presets-to-threshold-button

Conversation

@Greensand321
Copy link
Copy Markdown
Owner

Motivation

  • Provide quick selectable presets for duplicate-finder thresholds to make tuning easier (Tight, Default, Loose).
  • Detect manual edits and automatically mark the dialog as Custom so the UI reflects non-preset adjustments.
  • Ensure any configuration changes are only applied to the pipeline when the user confirms by pressing OK.

Description

  • Updated main_gui.py and the _open_threshold_settings dialog to add a preset_values map and import math for numeric comparison.
  • Added _matches_preset and current_settings logic to detect which preset (if any) matches the loaded configuration and initialize preset_var accordingly.
  • Implemented preset UI via a ttk.Combobox bound to preset_var, an _apply_preset handler that updates the dialog fields, and trace_add hooks plus _mark_custom to flip the selector to Custom when any field is edited.
  • Left the existing save flow intact so the OK button (existing _save logic) remains the single point where settings are persisted and the pipeline preview/plan is cleared.

Testing

  • No automated tests were run for this GUI-only change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant